Micron Document
🎖️GitЯра🎖️

Node / meshcore / MeshCore / files / src / helpers / stm32 / InternalFileSystem.h

Displaying Raw • Download

src/helpers/stm32/InternalFileSystem.h 890a2e2cffa98dea3ca88db3c3aba72ef23ff3f7 (890a2e2c) Text, 1.83 KB

T8b949e/*
* The MIT License (MIT)
*
* Copyright (c) 2019 hathach for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

Tff7b72#Tff7b72ifndef INTERNALFILESYSTEM_H_
Tff7b72#Tff7b72define INTERNALFILESYSTEM_H_
Tff7b72#Tff7b72include T8b949e"Adafruit_LittleFS.h"
Tff7b72#Tff7b72ifndef LFS_FLASH_TOTAL_SIZE T8b949e/* Flash size can be configured in platformio.ini */
Tff7b72#Tff7b72define LFS_FLASH_TOTAL_SIZE (16 * 2048) T8b949e/* defaults to 32k flash */
Tff7b72#Tff7b72endif
Tff7b72#Tff7b72define LFS_BLOCK_SIZE (2048)
Tff7b72#Tff7b72define LFS_FLASH_ADDR_BASE (FLASH_END_ADDR - LFS_FLASH_TOTAL_SIZE + 1)
Te6edf3class Te6edf3InternalFileSystem Tff7b72: Te6edf3public Te6edf3Adafruit_LittleFS
Tb4b4b4{
Te6edf3publicTff7b72:
Te6edf3InternalFileSystemTb4b4b4(Tffa657voidTb4b4b4)Tb4b4b4;
T8b949e// overwrite to also perform low level format (sector erase of whole flash region)
Tffa657bool Td2a8ffbeginTb4b4b4(Tffa657voidTb4b4b4)Tb4b4b4;
Tb4b4b4}Tb4b4b4;
Tff7b72extern Te6edf3InternalFileSystem Te6edf3InternalFSTb4b4b4;
Tff7b72#Tff7b72endif T8b949e/* INTERNALFILESYSTEM_H_ */

Served by rngit 1.5.1 - Generated in 0.06s